Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAVC Remand model & Controller #15351

Merged
merged 32 commits into from
Oct 2, 2020
Merged

CAVC Remand model & Controller #15351

merged 32 commits into from
Oct 2, 2020

Conversation

lomky
Copy link
Contributor

@lomky lomky commented Sep 30, 2020

Completes #15281

Description

Add the new model & Controller

Acceptance Criteria

  • Model for cavc remand created
  • Controller for cavc remand created
  • Validations
    • All fields required except as otherwise excepted below
    • Mandate Subtype (required for Mandate, not required for Straight Reversal nor Death Dismissal)
    • Mandate date and Judgement date (required for jmr/jmpr, not required for mdr)
    • Decision issue ids (all must match if this is a jmr)

Testing Plan

  1. Tests, reviewed for coverage, pass
  2. Maybe instantiate one in console? not sure what else to do here

Code Documentation Updates

  • Add or update code comments at the top of the class, module, and/or component.

Database Changes

Only for Schema Changes

  • Timestamps (created_at, updated_at) for new tables
  • Column comments updated
  • Have your migration classes inherit from Caseflow::Migration, especially when adding indexes (use add_safe_index)
  • Verify that migrate:rollback works as desired (change supported functions)
  • Query profiling performed (eyeball Rails log, check bullet and fasterer output)
  • Appropriate indexes added (especially for foreign keys, polymorphic columns, unique constraints, and Rails scopes)
  • DB schema docs updated with make docs (after running make migrate)
  • #appeals-schema notified with summary and link to this PR

@lomky lomky changed the title CAVC Remand model & controller CAVC Remand model Sep 30, 2020
@va-bot
Copy link
Collaborator

va-bot commented Sep 30, 2020

1 Warning
⚠️ This PR changes the schema. Please use the PR template checklist.

Generated by 🚫 Danger

@codeclimate
Copy link

codeclimate bot commented Sep 30, 2020

Code Climate has analyzed commit 14addc1 and detected 0 issues on this pull request.

View more on Code Climate.

Copy link
Contributor

@yoomlam yoomlam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of minor suggestions.

app/models/cavc_remand.rb Outdated Show resolved Hide resolved
app/models/cavc_remand.rb Outdated Show resolved Hide resolved
app/models/cavc_remand.rb Show resolved Hide resolved
app/models/cavc_remand.rb Outdated Show resolved Hide resolved
spec/models/cavc_remand_spec.rb Show resolved Hide resolved
spec/models/cavc_remand_spec.rb Show resolved Hide resolved
spec/models/cavc_remand_spec.rb Outdated Show resolved Hide resolved
spec/models/cavc_remand_spec.rb Outdated Show resolved Hide resolved
app/models/cavc_remand.rb Outdated Show resolved Hide resolved
app/models/cavc_remand.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@yoomlam yoomlam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pioneering new workflow! Woohoo!

spec/models/cavc_remand_spec.rb Outdated Show resolved Hide resolved
@lomky lomky added the Ready-to-Merge This PR is ready to be merged and will be picked up by va-bot to automatically merge to master label Oct 2, 2020
* WIP CAVC Remands Controller

* Finalize CAVC Remands controller

* Bugfix
@lomky lomky changed the title CAVC Remand model CAVC Remand model & Controller Oct 2, 2020
@lomky lomky linked an issue Oct 2, 2020 that may be closed by this pull request
3 tasks
@va-bot va-bot merged commit d466620 into master Oct 2, 2020
@va-bot va-bot deleted the kat/15281-cavc-remand-model branch October 2, 2020 21:00
va-bot pushed a commit that referenced this pull request Dec 7, 2020
Resolves #14795. Resolves CASEFLOW-65

### Description
Creates a new Post-dispatch actions area on the Case Details page which houses the Add Cavc Remand option.  This option is only available to member of the `CavcLitigationSupport` org and is also hidden behind the `cavc_remand` feature toggle.

Also creates the new Cavc Intake Form, which in conjunction with the work completed in #15351 and #15469 will allow Cavc litigation users to create a new Cavc appeal stream.

### Acceptance Criteria
- [x] "+Add Cavc remand" button is behind `cavc_remand` feature toggle
- [x] Only Cavc Litigation Support users can see the button
- [ ] Start CAVC Remand Documentation to describe what cavc remand features caseflow supports (to be updated as more cavc functionality is added)
- [x] Add CAVC Court Order Button to Case Details page of a Dispatched/Completed appeal that presents the form in a new top section
- [x] Cavc Litigation Support user can add the following required fields:
  - [ ] court docket number
  - [ ] Attorney representation
  - [ ] Cavc judge
  - [ ] Decision type (remand, death dismissal, etc)
  - [ ] type of remand (JMR, JMPR) on the form (only if remand)
  - [ ] Court decision date
  - [ ] Judgement date
  - [ ] Mandate date
  - [ ] issues required to be decided on in the new appeal stream
  - [ ] instructions
- [x] Confirmation alert appears with the following copy when the form is completed & submitted: 
        "You have successfully created a CAVC Remand case
         This has generated a Send 90 Day Letter task in your team's queue"
- [ ] Ensure users can copy and paste values from the cavc website without modifying data (see [here](#14795 (comment)) for how to get to the publicly available records)

### Testing Plan
1. Enable cavc_remand feature toggle
1. Find a dispatched appeal (search for vet 500000000)
1. Click "+ Add CAVC Remand"
1. Press submit and confirm validations
1. Confirm selecting "Death Dismissal" hides remand subtype
1. Fill out the form, keeping JMR selected
1. Deselect an issue
1. Press submit and confirm error message
1. Select all issues and press submit.
1. Confirm success message on case details of new appeal
1. Confirm case details shows correct information entered

### User Facing Changes
 - [ ] Screenshots of UI changes added to PR & Original Issue

Workflow|UI
 ---|---
New button|<img width="1447" alt="Screen Shot 2020-11-17 at 4 29 21 PM" src="https://user-images.githubusercontent.com/45575454/99457467-07565c00-28f9-11eb-8185-a590650e414d.png">
Validations|<img width="917" alt="Screen Shot 2020-11-17 at 1 57 50 PM" src="https://user-images.githubusercontent.com/45575454/99457433-f60d4f80-28f8-11eb-9250-3f7ecd7dc8ea.png"><img width="915" alt="Screen Shot 2020-11-17 at 1 57 58 PM" src="https://user-images.githubusercontent.com/45575454/99457438-f86fa980-28f8-11eb-9a2c-fa2ebe3b2bb0.png">
Back end error|<img width="818" alt="Screen Shot 2020-11-17 at 3 54 27 PM" src="https://user-images.githubusercontent.com/45575454/99457452-00c7e480-28f9-11eb-9489-87eefd9796a6.png">
Success Alert and new appeal|<img width="1115" alt="Screen Shot 2020-11-17 at 5 21 14 PM" src="https://user-images.githubusercontent.com/45575454/99457662-53090580-28f9-11eb-89fa-02b65183df65.png">

### Code Documentation Updates
- [ ] Add or update code comments at the top of the class, module, and/or component.

### Storybook Story
*For Frontend (Presentationa) Components*
* [x] Add a [Storybook](https://github.com/department-of-veterans-affairs/caseflow/wiki/Documenting-React-Components-with-Storybook) file alongside the component file (e.g. create `MyComponent.stories.js` alongside `MyComponent.jsx`)
* [x] Give it a title that reflects the component's location within the overall Caseflow hierarchy
* [x] Write a separate story (within the same file) for each discrete variation of the component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready-to-Merge This PR is ready to be merged and will be picked up by va-bot to automatically merge to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CAVC Remand: Litigation Support Form (Back End)
4 participants